package edu.hawaii.duedates;

import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Ignore;
import org.junit.Test;

/**
 * JUnit test cases for the Hawaii State Library's login.
 * 
 * @author Ka Hung Phillip Lau
 * @author Creighton Okada
 *
 */
public class TestHawaiiStateLibrary {
  /**
   * Tests loginToHawaiiStateLibraryMethod for correct input.
   * @throws Exception if login is incorrect
   */
  @Ignore 
  public void testLoginToHawaiiStateLibrary() throws Exception {
    String id = "id";
    String password = "password";
    HawaiiStateLibrary library = new HawaiiStateLibrary();
    List<Book> books = library.getHawaiiStateInfo(id, password);
    assertEquals("Test if books are borrowed (First character in the table is a '|')",
        '|', books.get(0).getBookTitle().charAt(0));
  }
  /**
   * Dummy test case.
   */
  @Test
  public void testNothing() {
    assertEquals("Keeps @Test non-use error from being generated", 1, 1);
  }
  /**
   * Tests the output for an account without any books checked out.
   * @throws Exception if login is incorrect
   */
  @Ignore
  public void testNoBooks() throws Exception {
    String id = "one that doesn't have books checked out";
    String password = "password";
    HawaiiStateLibrary library = new HawaiiStateLibrary();
    assertEquals("Testing if no books are out (Should return 'No items checked out').", 
        "No items checked out", library.getHawaiiStateInfo(id, password));
  }
}
